package com.design.command.task;

public class CommandQueueDemo {
    public static void main(String[] args) {
        TaskQueue taskQueue = new TaskQueue();

        Command emailCommand = new EmailCommand();
        Command reportCommand = new ReportCommand();

        taskQueue.addTask(emailCommand);
        taskQueue.addTask(reportCommand);

        // 执行任务队列中的任务
        taskQueue.processTasks();
    }
}
